package drds.server.route.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * Property文件加载器
 */
public class PropertiesUtil {
	public static Properties loadProperties(String propsFile) {
		Properties properties = new Properties();
		InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(propsFile);

		if (inputStream == null) {
			throw new RuntimeException("time sequnce properties not found " + propsFile);
		}
		try {
			properties.load(inputStream);
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		return properties;
	}
}
